#define _CRT_SECURE_NO_WARNINGS 1

#include "Queue.h"
#include "Tree.h"

int main()
{
	char a[] = "ABD##E#H##CF##G##";
	int len = strlen(a);
	int i = 0;
	printf("%d\n", len);
	BTNode* root = BinaryTreeCreate(a,len,&i);
	BinaryTreePrevOrder(root); 
	printf("\n");

	BinaryTreeInOrder(root);
	printf("\n");

	printf("BinaryTreeSize:%d\n", BinaryTreeSize(root));
	printf("BinaryTreeSize:%d\n", BinaryTreeSize(root)); 
	printf("BinaryTreeSize:%d\n", BinaryTreeSize(root));

	printf("BinaryTreeLeafSize:%d\n", BinaryTreeLeafSize(root)); 
	printf("BinaryTreeHeight:%d\n", BinaryTreeHeight(root));
	printf("BinaryTreeLevelK:%d\n", BinaryTreeLevelKSize(root, 4));

	BTNode* ret = BinaryTreeFind(root, 'H');
	printf("BinaryTreeFind:%p\n", ret);
	//ret->data++;
	printf("BinaryTreeComplete:%d\n", BinaryTreeComplete(root));

	BinaryTreePrevOrder(root);
	printf("\n");

	BinaryTreeInOrder(root);
	printf("\n");

	BinaryTreePostOrder(root);
	printf("\n");

	BinaryTreeLevelOrder(root);

	BinaryTreeDestory(&root);

	return 0;
}